<div class="row" style="background: #fff">

   <div class="col-md-12 text-center">
     <h2><i class="fa fa-check-circle text-success"></i> &nbsp;签到成功</h2>
   </div>

    <div class="col-md-4 m-t-md text-center">
        <%= image_tag @attendee.avatar, class: 'img-circle m-b-md', width: '70%'%>
    </div>

    <div class="col-md-8 m-t-xs text-left">

        <h4><%= @attendee.name %></h4>
        <ul class="list-unstyled" style="font-size:14px">
        <li>报名身份：<%= @attendee.category.try(:name)%> </li>
        <li>报名等级：<%= @attendee.level%> </li>
        <li>手机号码：<%= @attendee.mobile%> </li>
        <li>公司名称：<%= @attendee.company%></li>
        <% 
          session = Session.find(params[:session_id])
          session_seat_properties = session.try(:session_seat).try(:properties)
          display_table_num = session_seat_properties['set_table_num'] if session_seat_properties.present?
        %>
        <% seat = Seat.attendee_seat_is(@attendee, Session.find(params[:session_id])).try(:first) %>
        <% if seat.present? %>
          <li>座位:<%= seat.table_row %>桌<%= display_table_num=="true" ? "#{seat.table_col}号" : "" %></li>
        <% end %>
        </ul>

        <div class="m-b-md">
            <% style = (@attendee.printed_at.present? ? 'btn-white' : 'btn-primary') %>
            <% title = (@attendee.printed_at.present? ? '再次打印' : '打印入场证') %>
            <%= link_to title, 'javascript:;',  class: "btn #{style} btn-xs site-print-pdf-btn", data: {pdf: badge_event_attendee_path(id: @attendee.id, format: :pdf)}%>
            <%= link_to '取消签到', 'javascript:;', data: {token: @attendee.token}, class: 'btn btn-white btn-xs site-uncheck-in-btn' %>
            <%= link_to '关闭', 'javascript:;', class: 'btn btn-white btn-xs site-close-checkin-status' %>
            <% if @attendee.rfid_num.present? %>
              <%= link_to '再次绑定rfid', 'javascript:;', class: 'btn btn-white btn-xs bind-rfid', data: { attendee_id: @attendee.id } %>
            <% else %>
              <%= link_to '绑定rfid', 'javascript:;', class: 'btn btn-white btn-xs bind-rfid', data: { attendee_id: @attendee.id } %>
            <% end %>
        </div>

    </div>

</div>